cmake_minimum_required(VERSION 3.5)
project(PhotovoltaicRobotSimulationProgram)

set(CMAKE_CXX_STANDARD 11)

include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(${PROJECT_SOURCE_DIR}/libuv)
include_directories(${PROJECT_SOURCE_DIR}/utils)
aux_source_directory(./libuv LIBUV_SRC)
aux_source_directory(./Socket SOCKET_SRC)
aux_source_directory(./Config CONFIG_SRC)
aux_source_directory(./Object OBJECT_SRC)

add_executable(PhotovoltaicRobotSimulationProgram
        ${LIBUV_SRC} ${SOCKET_SRC} ${CONFIG_SRC} ${OBJECT_SRC}
        main.cpp)

IF (WIN32)
    target_link_libraries(${PROJECT_NAME}
            ${PROJECT_SOURCE_DIR}/libs/win/liblog4cplusU.dll.a
            ${PROJECT_SOURCE_DIR}/libs/win/libuv_a.a -lws2_32 -lpsapi -liphlpapi -lUserenv pthread)
ELSEIF (UNIX)
    target_link_libraries(${PROJECT_NAME}
            ${PROJECT_SOURCE_DIR}/libs/ubuntu/liblog4cplus.a
            ${PROJECT_SOURCE_DIR}/libs/ubuntu/libuv_a.a pthread -ldl)
ENDIF ()
